import requests
import json


def main():
    resp = requests.get("http://api.tianapi.com/internet/index?key=19297175882a98dafe240b2a70408f95&num=10")
    data_model = json.loads(resp.text)
    print(data_model)
    for news in data_model["newslist"]:
        print(news["title"])


if __name__ == "__main__":
    main()